<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta content="最热前端框架,爱尚博客,前端趋势,微信小程序制作,小程序教程,前端怎么做app,app制作,网站开发,靠谱的网站开发,app开发,小程序开发,小程序开发多少钱,app开发多少钱,网站开发多少钱"
        name="Keywords">
    <meta name="description" content="爱尚博客-让前端萌新少走弯路的博客！" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
    <title>爱尚博客-爱尚前端</title>
    <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    <script src="../../../common/public.js"></script>
    <link rel="stylesheet" href="../../css/e.css">
    <link rel="stylesheet" href="./css/nav.css">
</head>

<body>
    <div class="box" v-cloak>
        <el-button type="primary" style="margin-bottom:10px;" @click.native="dialogTableVisible1=true,tab_name='',tab_href='',per_type=false,tab_value=''">新建目录</el-button>
        <el-table :data="tableData" border style="width: 100%">
            <el-table-column prop="Id" label="ID" width="180">
            </el-table-column>
            <el-table-column prop="name" label="目录名称" width="180">
                <template slot-scope="scope">
                    <el-tag v-if="scope.row.flag2">顶级</el-tag>
                    {{scope.row.name}}
                </template>
            </el-table-column>
            <el-table-column prop="href" label="目录地址">
            </el-table-column>
            <el-table-column prop="flag1" label="状态">
                <template slot-scope="scope">
                    <el-switch v-model="scope.row.flag1" disabled>
                    </el-switch>
                </template>
            </el-table-column>
            <el-table-column prop="time" label="创建时间">
            </el-table-column>
            <el-table-column label="编辑">
                <template slot-scope="scope">
                    <el-button type="primary" plain @click.native="set_nav(scope.$index)">编辑</el-button>
                    <el-button type="danger" plain @click.native="del_nav(scope.$index)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>

        <!-- 目录详情 -->
        <el-dialog :title="tabitem" :visible.sync="dialogTableVisible">
            <el-form :model="gridData" label-position="left">
                <el-form-item label="ID" :label-width="formLabelWidth">
                    <el-input v-model="gridData.Id" autocomplete="off" disabled></el-input>
                </el-form-item>
                <el-form-item label="目录名称" :label-width="formLabelWidth">
                    <el-input v-model="gridData.name" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="目录地址" :label-width="formLabelWidth">
                    <el-input v-model="gridData.href" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="状态" :label-width="formLabelWidth">
                    <el-select placeholder="请选择所状态" v-model="gridData.flag">
                        <el-option label="开启" value="1"></el-option>
                        <el-option label="关闭" value="0"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="所属上级" :label-width="formLabelWidth">
                    <el-select placeholder="请选择所属上级" v-model="value" v-if="!gridData.flag2">
                        <el-option v-for="item in pertab" :label="item.name" :value="item.Id"></el-option>
                    </el-select>
                    <el-tag v-if="gridData.flag2">顶级</el-tag>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogTableVisible = false">取 消</el-button>
                <el-button type="primary" @click="set_naves(1)">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 目录详情 -->
        <!-- 新建目录 -->
        <el-dialog :title="tabitem" :visible.sync="dialogTableVisible1">
            <el-form label-position="left">
                <el-form-item label="目录名称" :label-width="formLabelWidth">
                    <el-input v-model="tab_name" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="目录地址" :label-width="formLabelWidth">
                    <el-input v-model="tab_href" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="状态" :label-width="formLabelWidth">
                    <el-select placeholder="请选择所状态" v-model="tab_flag">
                        <el-option label="开启" value="1"></el-option>
                        <el-option label="关闭" value="0"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="是否顶级" :label-width="formLabelWidth">
                    <el-switch v-model="per_type" active-color="#13ce66" inactive-color="#ff4949">
                    </el-switch>
                </el-form-item>
                <el-form-item label="所属上级" :label-width="formLabelWidth" v-if="!per_type">
                    <el-select placeholder="请选择所属上级" v-model="tab_value">
                        <el-option v-for="item in pertab" :label="item.name" :value="item.Id"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogTableVisible1 = false">取 消</el-button>
                <el-button type="primary" @click="set_naves()">确 定</el-button>
            </div>
        </el-dialog>
        <!-- 新建目录 -->


    </div>
</body>
<script src="../../../common/v.js"></script>
<script src="../../../common/a.js"></script>
<script src="../../js/e.js"></script>
<script src="./js/nav.js"></script>

</html>